<template>
	<view class="content">
		<u-sticky>
			<view class="u-padding-20" style="background: #FFFFFF;">

				<u-search placeholder="搜索社区案例" :v-model="initial.parm.keyword" :animation="false" bg-color="#fff"
					border-color="#333" :show-action="false" @change="searchChange">
				</u-search>

			</view>
		</u-sticky>

       
		<view v-for="(item,index) in list" :key="index" class="list" @click="go_detail(item)">

			<view class="">

				<view style="margin-top: 20rpx;position: relative; ">

					<u-image :src="item.cover" width="690" height="400" border-radius="20"></u-image>
				</view>
				<view class="u-padding-top-20 u-padding-bottom-20">
					<view class="u-flex u-row-between">
						<view class="u-flex" style="font-size: 30rpx;font-weight: bold;">
							<u-icon name="map-fill" color="#818DFF"></u-icon>
							<view>
								{{item.goodsName}}
							</view>
						</view>
						<view class="" style="color: #bebebe;">
							地区
						</view>
					</view>

					<view class="u-flex u-flex-wrap">
						<view style="width: 50%;padding: 10rpx 0;">户型:<text></text></view>
						<view style="width: 50%;padding: 10rpx 0;">使用面积:<text></text></view>
						<view style="width: 50%;padding: 10rpx 0;">费用:<text></text></view>
						<view style="width: 50%;padding: 10rpx 0;">风格:<text></text></view>
					</view>



				</view>

			</view>

		</view>



		<u-loadmore :status="initial.status" />



	</view>
</template>

<script>
	import loader from '@/common/loadPage.js';
	export default {
		mixins: [loader],
		data() {
			return {
				list: [],
				initial: {
					geturl: "/api/index/goods",
					parm: {
						goods_type: 1,
						keyword: ""
					},
					isPage: true
				}
			}
		},
		onLoad() {


		},
		methods: {
			go_detail(item) {
				uni.navigateTo({
					url: "./detail"
				})
			},
			searchChange(e){
				this.initial.parm.keyword=e;	
				this.initial.page=1;
			    loader.methods.getGoods.call(this);	
				this.$forceUpdate()
			}
		}
	}
</script>

<style lang="scss">
	page {
		background: #F8F8F8;
	}

	.list {
		background: #FFFFFF;
		width: 750rpx;
		margin-bottom: 20rpx;
		padding: 20rpx;
		position: relative;


	}

</style>
